package com.utheima.b;

import java.util.HashMap;
import java.util.Map;

public class Test {
    public static void main(String[] args) {

        Map<String, Map<String, String>> map1 = new HashMap<>();
        Map<String, String> map2 = new HashMap<>();
        Map<String, String> map3 = new HashMap<>();

        map2.put("001", "李晨");
        map2.put("002", "范冰冰");
        map1.put("Java基础班", map2);

        map3.put("001", "马云");
        map3.put("002", "马化腾");
        map1.put("Java就业班", map3);

        /*Set<Map.Entry<String, Map<String, String>>> s = map1.entrySet();
        for (Map.Entry<String, Map<String, String>> s1 : s) {
            System.out.println(s1.getKey()+":");
            Set<Map.Entry<String, String>> ss = s1.getValue().entrySet();
            for (Map.Entry<String, String> s2 : ss) {
                System.out.println(s2.getKey()+","+s2.getValue());
            }
        }*/
        map1.forEach((a,b)->{
            System.out.println(a+":");
            b.forEach((c,d)->{
                System.out.println(c+","+d);
            });
        });
    }
}
